<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        function f1(o){
            // var div=document.querySelector("div");
            // console.log(div);

            console.log(o);


        }

       window.onload=function(){
           var p=document.querySelector("p");
           p.onclick=function(){
                console.log(this);//事件源，触发事件的元素
           };
       };
    </script>
</head>
<body>
    <div onclick="f1(this)">div</div>
    <p>this is p</p>
</body>
</html>